unit RAvaliacaoMotorista;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, RLReport;

type
  TFormRAvaliacaoMotorista = class(TForm)
    RLReport1: TRLReport;
    RLBand1: TRLBand;
    RLSystemInfo1: TRLSystemInfo;
    RLSystemInfo2: TRLSystemInfo;
    RLLabel1: TRLLabel;
    lblDatafim: TRLLabel;
    lblDataIni: TRLLabel;
    RLLabel4: TRLLabel;
    RLLabel3: TRLLabel;
    RLGroup1: TRLGroup;
    RLBand3: TRLBand;
    RLLabel2: TRLLabel;
    RLLabel5: TRLLabel;
    RLLabel6: TRLLabel;
    RLLabel8: TRLLabel;
    RLGroup2: TRLGroup;
    RLBand2: TRLBand;
    RLImage1: TRLImage;
    RLDBText1: TRLDBText;
    RLDBText2: TRLDBText;
    RLDBText3: TRLDBText;
    RLImage2: TRLImage;
    RLImage3: TRLImage;
    RLBand4: TRLBand;
    RLDBText4: TRLDBText;
    RLLabel7: TRLLabel;
    RLLabel9: TRLLabel;
    RLDBText5: TRLDBText;
    procedure RLImage1BeforePrint(Sender: TObject; var PrintIt: Boolean);
    procedure RLImage3BeforePrint(Sender: TObject; var PrintIt: Boolean);
    procedure RLImage2BeforePrint(Sender: TObject; var PrintIt: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormRAvaliacaoMotorista: TFormRAvaliacaoMotorista;

implementation

uses DMR;

{$R *.dfm}

procedure TFormRAvaliacaoMotorista.RLImage1BeforePrint(Sender: TObject;
  var PrintIt: Boolean);
begin
    if not (DMRel.dsRelat.DataSet.FieldByName('TIPOAVALIACAO').AsString = 'A') then
        PrintIt := false
    else
        PrintIt := true;
end;

procedure TFormRAvaliacaoMotorista.RLImage3BeforePrint(Sender: TObject;
  var PrintIt: Boolean);
begin
    if not (DMRel.dsRelat.DataSet.FieldByName('TIPOAVALIACAO').AsString = 'C') then
        PrintIt := false
    else
        PrintIt := true;
end;

procedure TFormRAvaliacaoMotorista.RLImage2BeforePrint(Sender: TObject;
  var PrintIt: Boolean);
begin
    if not (DMRel.dsRelat.DataSet.FieldByName('TIPOAVALIACAO').AsString = 'B') then
        PrintIt := false
    else
        PrintIt := true;
end;

end.
